<template>
  <div class="dialog_award_container">
    <div class="dialog_award_content">
      <img :src="prize.dialogPic" class="dialog_award" alt=""/>
      <van-button class="dialog_award_btn dialog_fill_form_btn animate__animated animate__headShake animate__infinite" @click="onClick">马上领奖</van-button>
    </div>
  </div>
</template>
<script>
import { Popup, Button } from 'vant'
import { mapGetters } from 'vuex'
export default {
  components: { [Popup.name]: Popup, [Button.name]: Button },
  name: 'AwardPopup',
  data () {
    return {
    }
  },
  computed: {
    ...mapGetters(['prize'])
  },
  methods: {
    onClick () {
      this.$sound && this.$sound.play()
      this.$emit('show-form')
    }
  }
}
</script>
<style lang="scss" scoped>
@import "../assets/css/mixin.scss";
.dialog_award_container {
  display: flex;
  flex-direction: column;
  justify-content: center;;
  align-items: center;
  @include abs_center();
}
.dialog_award_content {
  @include wh(591, 539);
  background: url(../assets/img/dialog_award_bg.png) center no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-around;;
  align-items: center;
  padding: 124px 0  39px;
  font-size: 0;
}
.dialog_award {
  width: 100%
}
.dialog_award_btn {
  @include wh(358, 77);
  background: url(../assets/img/dialog_btn_bg.png) center no-repeat;
  background-size: 100% 100%;
  color: #fff;
  font-size: 36px;
  line-height: 77px;
  border: none;
  &.dialog_share_btn {
    margin: 48px auto 26px;
  }
  &.dialog_fill_form_btn {
    @include wh(359, 78);
    margin-top: 12px;
  }
}
</style>
